//
//  HYFileManager.h
//  XPlayer
//
//  Created by liguoqing on 2023/8/9.
//  文件管理类

#import <Foundation/Foundation.h>
#import "HYHomeFileItemViewModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface HYFileManager : NSObject

+ (instancetype)shareManager;

/// 保存视频封面
+ (NSString *)videoImageSavePathWithFileName:(NSString *)fileName;

// wifi导入路径
+ (NSString *)wifiImportFileDocumentPath;

// wifi指定文件夹导入
+ (NSString *)wifiImportFileDocumentPathWithFolerName:(NSString *)folerName;

// 根据相册导入的视频名称获取根路径
+ (NSString *)fetchPhotoVideoImportPathWithVideoName:(NSString *)videoName;

// 相册视频跟路径
+ (NSString *)photoVideoImportFolderRootPath;

/// 创建文件路径
+ (NSString *)createFolderPathWithFolderName:(NSString *)folderName;

/// 根据文件路径创建文件夹
+ (NSString *)createFolderPathWithFolderName:(NSString *)folderName filePath:(NSString *)filePath;

/// 获取文件夹路径
+ (NSString *)fetchFolderPathWithFolderName:(NSString *)folderName;

/// 移除文件夹路径
+ (BOOL)removeFolderPathWithFolderName:(NSString *)folderName;

/// 修改旧文件夹路径
+ (NSString *)moveFolderPathOldFolderPath:(NSString *)oldFolderPath newFolderName:(NSString *)newFolderName;

/// 移动文件
+ (BOOL )moveFileWithFromPath:(NSString *)fromPath toPath:(NSString *)toPath;

/// 下载路径
+ (NSString *)videoDownloadPathWithFileName:(NSString *)fileName;

/// 下载根路径
+ (NSString *)downloadRootPath;

/// 所有下载文件
+ (NSString *)videoFileDownloadRootPath;

/// 下载临时路径
+ (NSString *)tempSavePathWithFileName:(NSString *)fileName;

/// 检测视频的有效性
+ (BOOL)checkValidVideoPlayUrl:(NSString *)videoUrl;

/// 检测音频的有效性
+ (BOOL)checkValidAudioPlayUrl:(NSString *)audioUrl;

/// document文件夹
+ (NSString *)documentDirectory;

/// 获取文件夹标识
+ (NSString*)folderIdentification;

/// 获取文件夹内存大小
+ (NSInteger)getCacheSizeWithFolderPath:(NSString *)folderPath;

/// 获取单个文件大小
+ (NSInteger)getSingleFileSizeWithFilePath:(NSString *)filePath;

/// 获取单个文件的创建日期
+ (NSDate *)getSingalFileCreateDateWithFilePath:(NSString *)filePath;

/// 获取上传支持的文件类型
- (NSArray *)fetchImportfileTypes;

/// 获取文件类型
- (HYHomeFileType)fetchFileTypeWithFileName:(NSString *)fileName;

@end

NS_ASSUME_NONNULL_END
